"""Header_Information
------------------------------------
    File_Name: tortoise_demo
    Author: RR9
    Date: 2024/10/25
    Description: tortoise-orm的相关操作的数据库模型
------------------------------------
"""

from tortoise.models import Model
from tortoise import fields


class Event(Model):
    id = fields.IntField(primary_key=True)
    name = fields.TextField()
    datetime = fields.DatetimeField(null=True)

    class Meta:
        # 表名，没有设置的情况取类名
        table = "demo_event"

    def __str__(self):
        return self.name


